package com.suineg.pms.service.base;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.suineg.pms.entity.base.Building;
import com.suineg.pms.repository.base.BuildingDao;

/**
 *
 *@author Suine
 */
@Service
@Transactional(readOnly = true)
public class BuildingService {
	/** 日志输出对象 */
	protected final Logger logger = LoggerFactory.getLogger(getClass());
	@Autowired
	private BuildingDao buildingDao;
	
	public Building get(Long id){
		return buildingDao.findOne(id);
	}
	
	public void save(Building building){
		buildingDao.save(building);
	}
	public void delete(Long id){
		buildingDao.delete(id);
	}
	
	public Building findByNo(String no){
		return buildingDao.findByNo(no);
	}

}

